package com.example.jmeter.entity;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * @program: spring-agent
 * @description:
 * @author: zt22328 赵儒定
 * @create: 2023-04-19 13:20
 **/
@Data
@NoArgsConstructor
public class TestPlan {
    private String name;

    private String comments;

    private String functional_mode;

    private String tearDown_on_shutdown;

    private String serialize_threadgroups;

    private List<ThreadGroup> threadGroups = new ArrayList<>(8);

    private AggregateReport aggregateReport = new AggregateReport();

    public TestPlan(String name) {
        this.name = name;
    }

    public void addThreadGroup(ThreadGroup ... threadGroups) {
        this.threadGroups.addAll(Arrays.asList(threadGroups));
    }

}
